Optimal. Leaf size=531 \[ -\frac {2 e \left (25 a e^2 g^2+c \left (7 e^2 f^2+12 d e f g-90 d^2 g^2\right )\right ) \sqrt {f+g x} \sqrt {a+c x^2}}{105 c^2 g^2}+\frac {2 e (d+e x)^2 \sqrt {f+g x} \sqrt {a+c x^2}}{7 c}+\frac {2 e^2 (e f+11 d g) (f+g x)^{3/2} \sqrt {a+c x^2}}{35 c g^2}+\frac {2 \sqrt {-a} \left (a e^2 g^2 (19 e f+189 d g)-c \left (8 e^3 f^3-42 d e^2 f^2 g+105 d^2 e f g^2+105 d^3 g^3\right )\right ) \sqrt {f+g x} \sqrt {1+\frac {c x^2}{a}} E\left (\sin ^{-1}\left (\frac {\sqrt {1-\frac {\sqrt {c} x}{\sqrt {-a}}}}{\sqrt {2}}\right )|-\frac {2 a g}{\sqrt {-a} \sqrt {c} f-a g}\right )}{105 c^{3/2} g^3 \sqrt {\frac {\sqrt {c} (f+g x)}{\sqrt {c} f+\sqrt {-a} g}} \sqrt {a+c x^2}}-\frac {2 \sqrt {-a} e \left (c f^2+a g^2\right ) \left (25 a e^2 g^2-c \left (8 e^2 f^2-42 d e f g+105 d^2 g^2\right )\right ) \sqrt {\frac {\sqrt {c} (f+g x)}{\sqrt {c} f+\sqrt {-a} g}} \sqrt {1+\frac {c x^2}{a}} F\left (\sin ^{-1}\left (\frac {\sqrt {1-\frac {\sqrt {c} x}{\sqrt {-a}}}}{\sqrt {2}}\right )|-\frac {2 a g}{\sqrt {-a} \sqrt {c} f-a g}\right )}{105 c^{5/2} g^3 \sqrt {f+g x} \sqrt {a+c x^2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.74, antiderivative size = 527, normalized size of antiderivative = 0.99, number of steps
used = 8, number of rules used = 6, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {956, 1668, 858,
733, 435, 430} \begin {gather*} -\frac {2 \sqrt {-a} e \sqrt {\frac {c x^2}{a}+1} \left (a g^2+c f^2\right ) \sqrt {\frac {\sqrt {c} (f+g x)}{\sqrt {-a} g+\sqrt {c} f}} \left (25 a e^2 g^2-c \left (105 d^2 g^2-42 d e f g+8 e^2 f^2\right )\right ) F\left (\text {ArcSin}\left (\frac {\sqrt {1-\frac {\sqrt {c} x}{\sqrt {-a}}}}{\sqrt {2}}\right )|-\frac {2 a g}{\sqrt {-a} \sqrt {c} f-a g}\right )}{105 c^{5/2} g^3 \sqrt {a+c x^2} \sqrt {f+g x}}+\frac {2 \sqrt {-a} \sqrt {\frac {c x^2}{a}+1} \sqrt {f+g x} \left (a e^2 g^2 (189 d g+19 e f)-c \left (105 d^3 g^3+105 d^2 e f g^2-42 d e^2 f^2 g+8 e^3 f^3\right )\right ) E\left (\text {ArcSin}\left (\frac {\sqrt {1-\frac {\sqrt {c} x}{\sqrt {-a}}}}{\sqrt {2}}\right )|-\frac {2 a g}{\sqrt {-a} \sqrt {c} f-a g}\right )}{105 c^{3/2} g^3 \sqrt {a+c x^2} \sqrt {\frac {\sqrt {c} (f+g x)}{\sqrt {-a} g+\sqrt {c} f}}}+\frac {2 e \sqrt {a+c x^2} \sqrt {f+g x} \left (-e^2 \left (\frac {25 a}{c}+\frac {7 f^2}{g^2}\right )+90 d^2-\frac {12 d e f}{g}\right )}{105 c}+\frac {2 e^2 \sqrt {a+c x^2} (f+g x)^{3/2} (11 d g+e f)}{35 c g^2}+\frac {2 e \sqrt {a+c x^2} (d+e x)^2 \sqrt {f+g x}}{7 c} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 430
Rule 435
Rule 733
Rule 858
Rule 956
Rule 1668
Rubi steps
\begin {align*} \int \frac {(d+e x)^3 \sqrt {f+g x}}{\sqrt {a+c x^2}} \, dx &=\frac {2 e (d+e x)^2 \sqrt {f+g x} \sqrt {a+c x^2}}{7 c}-\frac {\int \frac {(d+e x) \left (-7 c d^2 f+a e (4 e f+d g)+\left (5 a e^2 g-c d (12 e f+7 d g)\right ) x-c e (e f+11 d g) x^2\right )}{\sqrt {f+g x} \sqrt {a+c x^2}} \, dx}{7 c}\\ &=\frac {2 e (d+e x)^2 \sqrt {f+g x} \sqrt {a+c x^2}}{7 c}+\frac {2 e^2 (e f+11 d g) (f+g x)^{3/2} \sqrt {a+c x^2}}{35 c g^2}-\frac {2 \int \frac {-\frac {1}{2} c g^2 \left (35 c d^3 f g-a e \left (3 e^2 f^2+53 d e f g+5 d^2 g^2\right )\right )+\frac {1}{2} c g \left (a e^2 g^2 (23 e f+63 d g)+c \left (2 e^3 f^3+22 d e^2 f^2 g-95 d^2 e f g^2-35 d^3 g^3\right )\right ) x+\frac {1}{2} c e g^2 \left (25 a e^2 g^2+c \left (7 e^2 f^2+12 d e f g-90 d^2 g^2\right )\right ) x^2}{\sqrt {f+g x} \sqrt {a+c x^2}} \, dx}{35 c^2 g^3}\\ &=-\frac {2 e \left (25 a e^2 g^2+c \left (7 e^2 f^2+12 d e f g-90 d^2 g^2\right )\right ) \sqrt {f+g x} \sqrt {a+c x^2}}{105 c^2 g^2}+\frac {2 e (d+e x)^2 \sqrt {f+g x} \sqrt {a+c x^2}}{7 c}+\frac {2 e^2 (e f+11 d g) (f+g x)^{3/2} \sqrt {a+c x^2}}{35 c g^2}-\frac {4 \int \frac {-\frac {1}{4} c g^4 \left (105 c^2 d^3 f g+25 a^2 e^3 g^2-a c e \left (2 e^2 f^2+147 d e f g+105 d^2 g^2\right )\right )+\frac {1}{4} c^2 g^3 \left (a e^2 g^2 (19 e f+189 d g)-c \left (8 e^3 f^3-42 d e^2 f^2 g+105 d^2 e f g^2+105 d^3 g^3\right )\right ) x}{\sqrt {f+g x} \sqrt {a+c x^2}} \, dx}{105 c^3 g^5}\\ &=-\frac {2 e \left (25 a e^2 g^2+c \left (7 e^2 f^2+12 d e f g-90 d^2 g^2\right )\right ) \sqrt {f+g x} \sqrt {a+c x^2}}{105 c^2 g^2}+\frac {2 e (d+e x)^2 \sqrt {f+g x} \sqrt {a+c x^2}}{7 c}+\frac {2 e^2 (e f+11 d g) (f+g x)^{3/2} \sqrt {a+c x^2}}{35 c g^2}-\frac {\left (a e^2 g^2 (19 e f+189 d g)-c \left (8 e^3 f^3-42 d e^2 f^2 g+105 d^2 e f g^2+105 d^3 g^3\right )\right ) \int \frac {\sqrt {f+g x}}{\sqrt {a+c x^2}} \, dx}{105 c g^3}+-\frac {\left (4 \left (-\frac {1}{4} c g^5 \left (105 c^2 d^3 f g+25 a^2 e^3 g^2-a c e \left (2 e^2 f^2+147 d e f g+105 d^2 g^2\right )\right )-\frac {1}{4} c^2 f g^3 \left (a e^2 g^2 (19 e f+189 d g)-c \left (8 e^3 f^3-42 d e^2 f^2 g+105 d^2 e f g^2+105 d^3 g^3\right )\right )\right )\right ) \int \frac {1}{\sqrt {f+g x} \sqrt {a+c x^2}} \, dx}{105 c^3 g^6}\\ &=-\frac {2 e \left (25 a e^2 g^2+c \left (7 e^2 f^2+12 d e f g-90 d^2 g^2\right )\right ) \sqrt {f+g x} \sqrt {a+c x^2}}{105 c^2 g^2}+\frac {2 e (d+e x)^2 \sqrt {f+g x} \sqrt {a+c x^2}}{7 c}+\frac {2 e^2 (e f+11 d g) (f+g x)^{3/2} \sqrt {a+c x^2}}{35 c g^2}-\frac {\left (2 a \left (a e^2 g^2 (19 e f+189 d g)-c \left (8 e^3 f^3-42 d e^2 f^2 g+105 d^2 e f g^2+105 d^3 g^3\right )\right ) \sqrt {f+g x} \sqrt {1+\frac {c x^2}{a}}\right ) \text {Subst}\left (\int \frac {\sqrt {1+\frac {2 a \sqrt {c} g x^2}{\sqrt {-a} \left (c f-\frac {a \sqrt {c} g}{\sqrt {-a}}\right )}}}{\sqrt {1-x^2}} \, dx,x,\frac {\sqrt {1-\frac {\sqrt {c} x}{\sqrt {-a}}}}{\sqrt {2}}\right )}{105 \sqrt {-a} c^{3/2} g^3 \sqrt {\frac {c (f+g x)}{c f-\frac {a \sqrt {c} g}{\sqrt {-a}}}} \sqrt {a+c x^2}}+-\frac {\left (8 a \left (-\frac {1}{4} c g^5 \left (105 c^2 d^3 f g+25 a^2 e^3 g^2-a c e \left (2 e^2 f^2+147 d e f g+105 d^2 g^2\right )\right )-\frac {1}{4} c^2 f g^3 \left (a e^2 g^2 (19 e f+189 d g)-c \left (8 e^3 f^3-42 d e^2 f^2 g+105 d^2 e f g^2+105 d^3 g^3\right )\right )\right ) \sqrt {\frac {c (f+g x)}{c f-\frac {a \sqrt {c} g}{\sqrt {-a}}}} \sqrt {1+\frac {c x^2}{a}}\right ) \text {Subst}\left (\int \frac {1}{\sqrt {1-x^2} \sqrt {1+\frac {2 a \sqrt {c} g x^2}{\sqrt {-a} \left (c f-\frac {a \sqrt {c} g}{\sqrt {-a}}\right )}}} \, dx,x,\frac {\sqrt {1-\frac {\sqrt {c} x}{\sqrt {-a}}}}{\sqrt {2}}\right )}{105 \sqrt {-a} c^{7/2} g^6 \sqrt {f+g x} \sqrt {a+c x^2}}\\ &=-\frac {2 e \left (25 a e^2 g^2+c \left (7 e^2 f^2+12 d e f g-90 d^2 g^2\right )\right ) \sqrt {f+g x} \sqrt {a+c x^2}}{105 c^2 g^2}+\frac {2 e (d+e x)^2 \sqrt {f+g x} \sqrt {a+c x^2}}{7 c}+\frac {2 e^2 (e f+11 d g) (f+g x)^{3/2} \sqrt {a+c x^2}}{35 c g^2}+\frac {2 \sqrt {-a} \left (a e^2 g^2 (19 e f+189 d g)-c \left (8 e^3 f^3-42 d e^2 f^2 g+105 d^2 e f g^2+105 d^3 g^3\right )\right ) \sqrt {f+g x} \sqrt {1+\frac {c x^2}{a}} E\left (\sin ^{-1}\left (\frac {\sqrt {1-\frac {\sqrt {c} x}{\sqrt {-a}}}}{\sqrt {2}}\right )|-\frac {2 a g}{\sqrt {-a} \sqrt {c} f-a g}\right )}{105 c^{3/2} g^3 \sqrt {\frac {\sqrt {c} (f+g x)}{\sqrt {c} f+\sqrt {-a} g}} \sqrt {a+c x^2}}+\frac {2 \sqrt {-a} e \left (c f^2+a g^2\right ) \left (8 c e^2 f^2-42 c d e f g+105 c d^2 g^2-25 a e^2 g^2\right ) \sqrt {\frac {\sqrt {c} (f+g x)}{\sqrt {c} f+\sqrt {-a} g}} \sqrt {1+\frac {c x^2}{a}} F\left (\sin ^{-1}\left (\frac {\sqrt {1-\frac {\sqrt {c} x}{\sqrt {-a}}}}{\sqrt {2}}\right )|-\frac {2 a g}{\sqrt {-a} \sqrt {c} f-a g}\right )}{105 c^{5/2} g^3 \sqrt {f+g x} \sqrt {a+c x^2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 24.11, size = 747, normalized size = 1.41 \begin {gather*} \frac {2 \sqrt {f+g x} \left (-g^2 \left (a+c x^2\right ) \left (25 a e^3 g^2+c e \left (-105 d^2 g^2-21 d e g (f+3 g x)+e^2 \left (4 f^2-3 f g x-15 g^2 x^2\right )\right )\right )+\frac {g^2 \left (-a^2 e^2 g^2 (19 e f+189 d g)+c^2 \left (8 e^3 f^3-42 d e^2 f^2 g+105 d^2 e f g^2+105 d^3 g^3\right ) x^2+a c \left (105 d^2 e f g^2+105 d^3 g^3-21 d e^2 g \left (2 f^2+9 g^2 x^2\right )+e^3 \left (8 f^3-19 f g^2 x^2\right )\right )\right )}{f+g x}+i c \sqrt {-f-\frac {i \sqrt {a} g}{\sqrt {c}}} \left (-a e^2 g^2 (19 e f+189 d g)+c \left (8 e^3 f^3-42 d e^2 f^2 g+105 d^2 e f g^2+105 d^3 g^3\right )\right ) \sqrt {\frac {g \left (\frac {i \sqrt {a}}{\sqrt {c}}+x\right )}{f+g x}} \sqrt {-\frac {\frac {i \sqrt {a} g}{\sqrt {c}}-g x}{f+g x}} \sqrt {f+g x} E\left (i \sinh ^{-1}\left (\frac {\sqrt {-f-\frac {i \sqrt {a} g}{\sqrt {c}}}}{\sqrt {f+g x}}\right )|\frac {\sqrt {c} f-i \sqrt {a} g}{\sqrt {c} f+i \sqrt {a} g}\right )+\frac {g \left (\sqrt {c} f+i \sqrt {a} g\right ) \left (105 i c^{3/2} d^3 g^2+25 a^{3/2} e^3 g^2+3 i a \sqrt {c} e^2 g (2 e f-63 d g)+\sqrt {a} c e \left (-8 e^2 f^2+42 d e f g-105 d^2 g^2\right )\right ) \sqrt {\frac {g \left (\frac {i \sqrt {a}}{\sqrt {c}}+x\right )}{f+g x}} \sqrt {-\frac {\frac {i \sqrt {a} g}{\sqrt {c}}-g x}{f+g x}} \sqrt {f+g x} F\left (i \sinh ^{-1}\left (\frac {\sqrt {-f-\frac {i \sqrt {a} g}{\sqrt {c}}}}{\sqrt {f+g x}}\right )|\frac {\sqrt {c} f-i \sqrt {a} g}{\sqrt {c} f+i \sqrt {a} g}\right )}{\sqrt {-f-\frac {i \sqrt {a} g}{\sqrt {c}}}}\right )}{105 c^2 g^4 \sqrt {a+c x^2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(3921\) vs.
\(2(453)=906\).
time = 0.13, size = 3922, normalized size = 7.39
method | result | size |
elliptic | \(\frac {\sqrt {\left (g x +f \right ) \left (c \,x^{2}+a \right )}\, \left (\frac {2 e^{3} x^{2} \sqrt {c g \,x^{3}+c f \,x^{2}+a g x +f a}}{7 c}+\frac {2 \left (3 d \,e^{2} g +\frac {1}{7} f \,e^{3}\right ) x \sqrt {c g \,x^{3}+c f \,x^{2}+a g x +f a}}{5 c g}+\frac {2 \left (3 g \,d^{2} e +3 f d \,e^{2}-\frac {4 f \left (3 d \,e^{2} g +\frac {1}{7} f \,e^{3}\right )}{5 g}-\frac {5 a g \,e^{3}}{7 c}\right ) \sqrt {c g \,x^{3}+c f \,x^{2}+a g x +f a}}{3 c g}+\frac {2 \left (d^{3} f -\frac {2 f a \left (3 d \,e^{2} g +\frac {1}{7} f \,e^{3}\right )}{5 c g}-\frac {a \left (3 g \,d^{2} e +3 f d \,e^{2}-\frac {4 f \left (3 d \,e^{2} g +\frac {1}{7} f \,e^{3}\right )}{5 g}-\frac {5 a g \,e^{3}}{7 c}\right )}{3 c}\right ) \left (\frac {f}{g}-\frac {\sqrt {-a c}}{c}\right ) \sqrt {\frac {x +\frac {f}{g}}{\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}\, \sqrt {\frac {x -\frac {\sqrt {-a c}}{c}}{-\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}\, \sqrt {\frac {x +\frac {\sqrt {-a c}}{c}}{-\frac {f}{g}+\frac {\sqrt {-a c}}{c}}}\, \EllipticF \left (\sqrt {\frac {x +\frac {f}{g}}{\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}, \sqrt {\frac {-\frac {f}{g}+\frac {\sqrt {-a c}}{c}}{-\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}\right )}{\sqrt {c g \,x^{3}+c f \,x^{2}+a g x +f a}}+\frac {2 \left (g \,d^{3}+3 f \,d^{2} e -\frac {4 f a \,e^{3}}{7 c}-\frac {3 a \left (3 d \,e^{2} g +\frac {1}{7} f \,e^{3}\right )}{5 c}-\frac {2 f \left (3 g \,d^{2} e +3 f d \,e^{2}-\frac {4 f \left (3 d \,e^{2} g +\frac {1}{7} f \,e^{3}\right )}{5 g}-\frac {5 a g \,e^{3}}{7 c}\right )}{3 g}\right ) \left (\frac {f}{g}-\frac {\sqrt {-a c}}{c}\right ) \sqrt {\frac {x +\frac {f}{g}}{\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}\, \sqrt {\frac {x -\frac {\sqrt {-a c}}{c}}{-\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}\, \sqrt {\frac {x +\frac {\sqrt {-a c}}{c}}{-\frac {f}{g}+\frac {\sqrt {-a c}}{c}}}\, \left (\left (-\frac {f}{g}-\frac {\sqrt {-a c}}{c}\right ) \EllipticE \left (\sqrt {\frac {x +\frac {f}{g}}{\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}, \sqrt {\frac {-\frac {f}{g}+\frac {\sqrt {-a c}}{c}}{-\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}\right )+\frac {\sqrt {-a c}\, \EllipticF \left (\sqrt {\frac {x +\frac {f}{g}}{\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}, \sqrt {\frac {-\frac {f}{g}+\frac {\sqrt {-a c}}{c}}{-\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}\right )}{c}\right )}{\sqrt {c g \,x^{3}+c f \,x^{2}+a g x +f a}}\right )}{\sqrt {g x +f}\, \sqrt {c \,x^{2}+a}}\) | \(882\) |
risch | \(\text {Expression too large to display}\) | \(1610\) |
default | \(\text {Expression too large to display}\) | \(3922\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 0.38, size = 436, normalized size = 0.82 \begin {gather*} \frac {2 \, {\left ({\left (210 \, c^{2} d^{3} f g^{3} - {\left (8 \, c^{2} f^{4} - 13 \, a c f^{2} g^{2} - 75 \, a^{2} g^{4}\right )} e^{3} + 42 \, {\left (c^{2} d f^{3} g - 6 \, a c d f g^{3}\right )} e^{2} - 105 \, {\left (c^{2} d^{2} f^{2} g^{2} + 3 \, a c d^{2} g^{4}\right )} e\right )} \sqrt {c g} {\rm weierstrassPInverse}\left (\frac {4 \, {\left (c f^{2} - 3 \, a g^{2}\right )}}{3 \, c g^{2}}, -\frac {8 \, {\left (c f^{3} + 9 \, a f g^{2}\right )}}{27 \, c g^{3}}, \frac {3 \, g x + f}{3 \, g}\right ) - 3 \, {\left (105 \, c^{2} d^{3} g^{4} + 105 \, c^{2} d^{2} f g^{3} e + {\left (8 \, c^{2} f^{3} g - 19 \, a c f g^{3}\right )} e^{3} - 21 \, {\left (2 \, c^{2} d f^{2} g^{2} + 9 \, a c d g^{4}\right )} e^{2}\right )} \sqrt {c g} {\rm weierstrassZeta}\left (\frac {4 \, {\left (c f^{2} - 3 \, a g^{2}\right )}}{3 \, c g^{2}}, -\frac {8 \, {\left (c f^{3} + 9 \, a f g^{2}\right )}}{27 \, c g^{3}}, {\rm weierstrassPInverse}\left (\frac {4 \, {\left (c f^{2} - 3 \, a g^{2}\right )}}{3 \, c g^{2}}, -\frac {8 \, {\left (c f^{3} + 9 \, a f g^{2}\right )}}{27 \, c g^{3}}, \frac {3 \, g x + f}{3 \, g}\right )\right ) + 3 \, {\left (105 \, c^{2} d^{2} g^{4} e + {\left (15 \, c^{2} g^{4} x^{2} + 3 \, c^{2} f g^{3} x - 4 \, c^{2} f^{2} g^{2} - 25 \, a c g^{4}\right )} e^{3} + 21 \, {\left (3 \, c^{2} d g^{4} x + c^{2} d f g^{3}\right )} e^{2}\right )} \sqrt {c x^{2} + a} \sqrt {g x + f}\right )}}{315 \, c^{3} g^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (d + e x\right )^{3} \sqrt {f + g x}}{\sqrt {a + c x^{2}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {\sqrt {f+g\,x}\,{\left (d+e\,x\right )}^3}{\sqrt {c\,x^2+a}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________